package com.diligent.cloud.printer.server.resource;

import com.canny.commons.model.Result;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Description:
 * @Author: xf107397
 * @Date: Create：in 2020-06-20:15:08
 * @Modified By：
 */
@RequestMapping("/printer")
public interface PrinterServerResource {

    @PostMapping(value = "/printFile")
    ResponseEntity<Result> printFile(@RequestPart("file") MultipartFile file,String printerName);

    @PostMapping(value = "addPrinter")
    ResponseEntity<Result> addPrinter(@RequestParam("printerName")String printerName
                                        ,@RequestParam("printerUrl")String printerUrl
                                        ,@RequestParam("ppdFile")MultipartFile ppdFile);
}
